{% extends 'djadmin/base.html' %}

{% load djadmin_tags %}

{% block title %}
    数据表删除 - 后台管理
{% endblock %}

{% block content %}
    <h2 class="page-header">{{ model_name }}</h2>
    <h3 class="page-header alert alert-danger">你确定要删除吗？</h3>

    <div>
        删除<a href="{% url 'djadmin:table_change' app_name model_name obj.id %}">【{{ obj }}】</a>
    </div>

    {% display_all_related_objs obj as all_related_obj_eles %}
    {{ all_related_obj_eles|safe }}  {# 需要加上|safe，否则会直接显示源代码 #}

    <form method="post">
        {% csrf_token %}
        <input class="hidden" value="yes" name="delete_confirm">
        <input type="submit" class="btn btn-danger" value="确认删除">
        <a class="btn btn-info" href="{% url 'djadmin:table_change' app_name model_name obj.id %}">返回编辑</a>
    </form>
{% endblock %}